/*
  User: Yemao Luo
  Date: 2021/9/10
  Time: 15:28
*/

import java.util.Scanner;

public class factorialOfN {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        //初始化数组
        int result[] = new int[1000];
        result[0] = 1;
        int result_size = 1;
        //开始计算
        for (int i = 1; i <= number; i++) {
            int carry = 0;
            //计算对应位的乘积
            for (int j = 0; j < result_size; j++) {
                int temp = result[j] * i + carry;
                result[j] = temp % 10;
                carry = temp / 10;
            }
            //处理进位
            while (carry != 0) {
                result[result_size] = carry % 10;
                carry /= 10;
                result_size++;
            }
        }
        //输出结果
        for (int i = result_size - 1; i >= 0; i--){
            System.out.print(result[i]);
        }
    }
}

